﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace IDAL
{
    public interface IUserLoginDAL
    {
       //////////////////////////////////
        // private int _UL_userId;
       // private string _UI_userName;
       // private string _UI_password;
       // private System.DateTime _UL_lastLoginTime;
       // private int _UL_status;
       /////////////////////////////////


        /// <summary>
        /// 根据传入的userId判断一条数据是否存在
        /// </summary>       
        bool userIdExists(int userId);


        /// <summary>
        /// 根据传入的userID判断一条数据是否存在
        /// </summary>       
        bool userNameExists(string userName);


        /// <summary>
        /// 增加一条数据
        /// </summary>                
        bool Add(string userName, string password, System.DateTime lastLoginTime, int status);


        /// <summary>
        /// 增加一条数据
        /// </summary>
        bool Add(Model.UserLogin userLogin);


        /// <summary>
        /// 更新一条数据
        /// </summary>                
        bool Update(int userId, string userName,string password, System.DateTime lastLoginTime, int status);


        /// <summary>
        /// 修改用户信息
        /// </summary>
        bool Update(Model.UserLogin userLogin);


        /// <summary>
        /// 删除一个login通过ID
        /// </summary>
        bool userIdDelete(int userId);


        /// <summary>
        /// 根据ID查询用户对象
        /// </summary>
        Model.UserLogin getUserById(int userId);

        /// <summary>
        /// 根据ID查询用户对象
        /// </summary>
        Model.UserLogin getUserByUsername(string username);


        /// <summary>
        /// 根据ID查看账号是否被限制
        /// </summary>
        int isLimit(int userId);


        /// <summary>
        /// 根据名字查看账号是否被限制
        /// </summary>
        int isLimit(string userName);
        
    }

}
